package com.dahua.messagesyncsh.common;

import java.util.Arrays;
import java.util.HashMap;
import java.util.List;

public class Constants {
    public static final String COMMA = ",";

    public static final String NULL = "NULL";

    public static final String ALL = "ALL";

    public static final String EQUIPMENT_ABBREVIATION = "EQUIPMENT_ABBREVIATION";

    public static final String EQUIPMENT_DETAIL = "EQUIPMENT_DETAIL";

    public static final String EQUIPMENT_T485_DATA = "EQUIPMENT_T485_DATA";

    public static final String EQUIPMENT_485_IN_ = "EQUIPMENT_485_IN_";

    public static final String SENSOR_DETAIL = "SENSOR_DETAIL";

    public static final String LATEST_STATUS_DATA = "LATEST_STATUS_DATA";

    public static final String LINE_INFO = "LINE_INFO";

    public static final String STATION_INFO = "STATION_INFO";

    public static final String FAULT_INFO = "FAULT_INFO";

    public static final String COLLECTION_INFO = "COLLECTION_INFO";

    public static final String LATEST_EQUIPMENT_STATUS= "LATEST_EQUIPMENT_STATUS";

    public static final String EQUIPMENT_BK2_NULL = "EQUIPMENT_BK2_NULL";

    public static final String LATEST_SENSOR_DATA  = "LATEST_SENSOR_DATA";

    //  三菱需要订阅的设备bk1
    public static final String MITSUBISHI_SYNC_EQUIPMENT = "MITSUBISHI_SYNC_EQUIPMENT";

    public static final List<String> ORIGINAL_TYPES = Arrays.asList("FT", "ZT", "RXD");

    public static volatile boolean IS_INITIALIZE = false;

    public static final HashMap<Character, Integer> CHINESE_NUMBER = new HashMap<Character, Integer>() {{
        put('零', 0);
        put('一', 1);
        put('二', 2);
        put('三', 3);
        put('四', 4);
        put('五', 5);
        put('六', 6);
        put('七', 7);
        put('八', 8);
        put('九', 9);
        put('十', 10);
        put('百', 100);
        put('千', 1000);
        put('万', 10000);
        put('亿', 100000000);
    }};

    public static final String  DATETIME_FORMATTER_ONE = "yyyy-MM-dd HH:mm:ss";

    public static final String  CONTROL56_LIST = "CONTROL56_LIST";


    /*  sec's kafka topics*/
    public static final String  SEC_EQUIPMENT_INFO_PUSH = "EX_EQUIPMENT_LEDGER_PHM_ZK_OTIS_CH";

    public static final String  SEC_EQUIPMENT_FAULT_PUSH = "EX_EQUIPMENT_FAULT_REPORT_PHM_ZK_OTIS_CH";

    public static final String  SEC_EQUIPMENT_FAULT_PULL = "EX_EQUIPMENT_FAULT_REPORT_PHM_RESULT_ZK_OTIS_CH";

    /*  redis storage if fail in handle*/
    public static final String  FAULT_UPDATE_FAIL_DATA = "FAULT_UPDATE_FAIL_DATA";

    public static final String  SEC_FAULT_UPDATE_FAIL_DATA = "SEC_FAULT_UPDATE_FAIL_DATA";

    public static final String  SEC_FAULT_SEND_FAIL_DATA = "SEC_FAULT_SEND_FAIL_DATA";

    public static final String  SEC_FAULT_INSERT_FAIL_DATA = "SEC_FAULT_INSERT_FAIL_DATA";

    public static final String  SEC_FAULT_IS_NULL_RESULT = "SEC_FAULT_IS_NULL_RESULT";


    /*  websocket订阅主题*/
    public static final String  WEBSOCKET_FAULT_OCCUR =  "WEBSOCKET_FAULT_OCCUR";

    public static final String  WEBSOCKET_FAULT_RECOVERY =  "WEBSOCKET_FAULT_RECOVERY";

    /*  已发送的sec_fault*/
    public static final String  SEC_FAULT_SENT =  "SEC_FAULT_SENT";

    /*  扶梯厂家*/
    public static final String OTIS = "OTIS";

    public static final String MITSUBISHI = "MITSUBISHI";

    public static final String TKE = "TKE";

    /*  CMode和Feature同步
    * 以1h为界限保存数据同步信息，每一小时清理一小时前的数据，超过一小时的滞后数据先判断是否存在该条记录
    * */
    public static final String CMODE_FEATURE_SYNC = "CMODE_FEATURE_SYNC_DATA";

    /*  数据库名字*/
    public static final String DATABASE_TABLE_NAME = "DATABASE_TABLE_NAME";

    /*  rabbitmq*/
    public static final String RABBITMQ_CONSUMER_CONTAINER_NAME = "RABBITMQ_CONSUMER_CONTAINER_NAME";
}
